/*
 * Copyright © 2010 SenseForce.com.
 * The Software shall be used for Good, not Evil.
 */

package com.senseforce.classes;

/**
 *
 * @author jcccn
 * @site http://www.senseforce.com/
 */
public class SynchronizedAccount {
    String Owner;
    float amount;

    public SynchronizedAccount(String name, float amt) {
        Owner = name;
        amount = amt;
    }

    public synchronized  void deposit(float amt) {
        amount += amt;
    }

    public synchronized  void withdraw(float amt) {
        amount -= amt;
    }

    public float checkBalance() {
        return amount;
    }
}
